package cn.qzbook;

import cn.qzbook.dao.Student.StudentDao;
import cn.qzbook.domain.Student;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.List;
import java.util.Map;

public class Test {

    public static void main(String[] args) throws IOException {

        StudentDao s = new StudentDao();

//        List<Student> students = s.selectList();
        List<Student> students = s.selectOrderBy("desc");
//
        for (Student student : students){
            System.out.println(student);
        }

//        System.out.println(s.selectCount());

//        System.out.println(s.selectOne());

//        s.insert();

//        List<Map<String, Integer>> maps = s.selectNameAndNum();
//
//        for (Map<String,Integer> map : maps){
//            System.out.println(map);
//        }

//        Student student = new Student();
//        student.setAge(12);
//        student.setName("liusanjie");
//        s.insertByObj(student);



    }

}
